package com.technodo.gamedata;

public class CommonCalc {

	/**
	 * Calculate cost of tech 
	 * 
	 * @param numTechs number of techs of owned already
	 * @return cost of owning the tech
	 */
	public static int calculateTechCost(int numTechs) {
		// some high number that cannot be gotten realistically in game
		int value = 273648;
		switch(numTechs) {
		case 0:
			value = 1;
			break;
		case 1:
			value = 4;
			break;
		case 2: 
			value = 8;
			break;
		case 3:
			value = 16;
			break;
		}
		return value;
	}

	/**
	 * Calculate cost of director 
	 * 
	 * @param numDirector number of director of owned already
	 * @return cost of owning the director
	 */
	public static int calculateDirectorCost(int numDirector) {
		// some high number that cannot be gotten realistically in game
		int value = 555555;
		switch(numDirector) {
		case 0:
			value = 4;
			break;
		case 1:
			value = 8;
			break;
		case 2:
			value = 16;
			break;
		case 3:
			value = 32;
			break;
		case 4:
			value = 64;
			break;
		case 5:
			value = 128;
			break;
		case 6:
			value = 256;
			break;
		case 7:
			value = 512;
			break;
		case 8:
			value = 1024;
			break;
		case 9:
			value = 2048;
			break;
		case 10:
			value = 4096;
			break;
		case 11:
			value = 8192;
			break;
		case 12:
			value = 16384;
			break;
		case 13:
			value = 32768;
			break;
		case 14:
			value = 65536;
			break;
		case 15:
			value = 131072;
			break;
		}
		return value;
	}

}
